﻿namespace Iit.Automation.Browsers
{
    using Iit.Automation.Browsers.Chrome;
    using Iit.Automation.Browsers.FireFox;
    using Iit.Automation.Browsers.IE;
    using Iit.Automation.Browsers.Shared;

    public class BrowserFactory
    {
        public static IBrowser GetBrowser(IitEnums.RegisteredBrowsers whichBrowser, string driverPath = "")
        {
            IBrowser result = null;
            switch (whichBrowser)
            {
                case IitEnums.RegisteredBrowsers.Chrome:
                    result = ChromeBrowser.GetInstance(driverPath);
                    break;
                case IitEnums.RegisteredBrowsers.IE:
                    result = IEBrowser.GetInstance(driverPath);
                    break;
                case IitEnums.RegisteredBrowsers.FireFox:
                    result = FirefoxBrowser.GetInstance(driverPath);
                    break;
            }

            return result;
        }
    }
}
